package com.baizhi.controller;

import com.baizhi.service.FollowingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping
@RefreshScope
public class FollowingController {

    @Autowired
    private FollowingService followingService;

    @GetMapping("following")
    public List<Integer> queryAllFollowingByUserId(@RequestParam("uid") Integer uid) {
        List<Integer> integers = followingService.queryAllByUserId(uid);
        return integers;
    }
}
